﻿<%@ Page Language="C#" AutoEventWireup="true" Debug="true" CodeFile="newsList.aspx.cs" Inherits="Manage_newsList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" type="text/css" href="css/admin.css" />

    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
            <tr height="28">
                <td background="images/title_bg1.jpg">
                    当前位置:
                    <asp:SiteMapPath ID="SiteMapPath1" runat="server" SiteMapProvider="ManageSiteMapProvider">
                    </asp:SiteMapPath>
                </td>
            </tr>
            <tr>
                <td bgcolor="#b1ceef" height="1">
                </td>
            </tr>
            <tr height="20">
                <td background="images/shadow_bg.jpg">
                </td>
            </tr>
        </table>
        <div style="margin-left: 10px; margin-right: 10px">
            <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                <tr height="1">
                    <td>
                    </td>
                </tr>
                <tr height="22">
                    <td style="padding-left: 20px; font-weight: bold; color: #ffffff" align="left" background="images/title_bg2.jpg">
                        新闻列表
                    </td>
                </tr>
                <tr bgcolor="#ecf4fc" height="12">
                    <td>
                    </td>
                </tr>
                <tr height="5">
                    <td>
                    </td>
                </tr>
            </table>
            <div>
                <asp:GridView ID="grd_News" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="grd_News_SelectedIndexChanged"
                    CellPadding="4" ForeColor="#333333" GridLines="None" Width="95%" 
                    AllowPaging="True" onrowdeleting="grd_News_RowDeleting" PageSize="15">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:BoundField DataField="Id" HeaderText="编号" />
                        <asp:BoundField DataField="Title" HeaderText="新闻标题" />
                        <asp:BoundField DataField="CategoryName" HeaderText="所属分类" />
                        <asp:BoundField DataField="Time" HeaderText="添加时间" />
                        <asp:BoundField DataField="Author" HeaderText="作者" />
                        <asp:CommandField ShowDeleteButton="True" ItemStyle-ForeColor="Red">
                            <ItemStyle ForeColor="Red"></ItemStyle>
                        </asp:CommandField>
                        <asp:CommandField SelectText="查看" ShowSelectButton="True" ItemStyle-ForeColor="Red">
                            <ItemStyle ForeColor="Red"></ItemStyle>
                        </asp:CommandField>
                    </Columns>
                    <PagerTemplate>
                        <!---------------------------分页情况显示---------------------------------------->
                        <table width="100%">
                            <tr>
                                <td style="text-align: right; color: Aqua;">
                                    共<asp:Label ID="lbl_Count" runat="server"></asp:Label>条&nbsp; 第<asp:Label ID="lbl_PageIndex"
                                        runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>'></asp:Label>页/
                                    共<asp:Label ID="lbl_PageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>'></asp:Label>页
                                    <asp:LinkButton ID="btn_First" runat="server" CommandArgument="First" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" Text="首页"
                                        Font-Underline="True" BorderStyle="NotSet">
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="btn_Prev" runat="server" CommandArgument="Prev" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" Text="上一页"
                                        Font-Underline="True">
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="btn_Next" runat="server" CommandArgument="Next" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                        Text="下一页" Font-Underline="True"></asp:LinkButton>
                                    <asp:LinkButton ID="btn_Last" runat="server" CommandArgument="Last" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                        Text="尾页" Font-Underline="True"></asp:LinkButton>&nbsp;
                                    <asp:TextBox ID="txt_PageIndex" runat="server" Width="20px"></asp:TextBox>
                                    <asp:LinkButton ID="btn_Go" runat="server" Text="GO" CommandName="Go" Font-Underline="True" />
                                </td>
                            </tr>
                        </table>
                        <!------------------------------------------------------------------->
                    </PagerTemplate>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
